package com.service.impl;

import com.bean.dangBean.Balance;
import com.dao.dangDao.BalanceMapper;
import com.service.BalanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("balanceService")
public class BalanceServiceImpl implements BalanceService {
    @Autowired
    private BalanceMapper balanceMapper;
    @Override
    public int save(Balance balance) {
        return balanceMapper.insert(balance);
    }

    @Override
    public int remove(Balance balance) {
        return balanceMapper.delete(balance);
    }

    @Override
    public int modify(Balance balance) {
        return balanceMapper.update(balance);
    }

    @Override
    public List<Balance> find(Balance balance) {
        return balanceMapper.select(balance);
    }

    @Override
    public int count(Map<String, Object> map) {
        return balanceMapper.selectCount(map);
    }

    @Override
    public List<Balance> query(Map<String, Object> map) {
        return balanceMapper.selectByPage(map);
    }

}
